<?php

namespace app\common\model;

use app\extra\BaseModel;

class Speciality extends BaseModel
{


    /**
     * 添加额外参数
     * @param $item
     */
    public function setAddedField(&$item){

        $item['material_num'] = model('material')->where('speciality_id', $item['id'])->count();

    }


}
